package com.sunny.shop.api.v1;

import com.sunny.shop.model.Song;
import com.sunny.shop.model.Theme;
import com.sunny.shop.service.ThemeService;
import com.sunny.shop.vo.SongVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/theme")
public class ThemeController {
    @Autowired
    private ThemeService themeService;

    @GetMapping("/name/{name}")
    public List<SongVO> getThemeList(@PathVariable String name){
        List<SongVO> theme = themeService.getThemeByName(name);
        return theme;
    }
}
